home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 98
/
Skunkware 98.iso
/
src
/
net
/
bind-contrib.tar.gz
/
bind-contrib.tar
/
contrib
/
doc
/
doc1.awk
< prev
next >
Wrap
Text File
|
1996-10-25
|
491b
|
33 lines
#
# doc1.awk
#
# Distributed with: Doc - Version 2.0 (8/22/90)
# USC Information Sciences Institute
#
# Accepts as input, output from dig querying for SOA of a domain.
# Expects input to be lower case.
#
# Prints serial # of SOA (only one)
# Exit status indicates:
# o response was authoritative (or not)
# o number of SOA records found
#
BEGIN {aa=0; ss=0}
/flags:/ && /aa/ {aa++}
$3 == "serial" {soa=$1; ss++}
END {
print soa
if (aa==0)
{ss=0-ss};
exit(ss);
}